-
-
Notifications
You must be signed in to change notification settings - Fork 525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AutocompleteInput: allow user-defined values #1588
AutocompleteInput: allow user-defined values #1588
Conversation
bokeh 2.3.0 introduces a new `restrict` keyword (default: True). Setting it to False allows users to enter values that are not present in the list of completions.
db027e6
to
cff3c3d
Compare
It's not really clear to me what caused the CI to fail here. From local testing, however, it seems to me that there is some incompatibility with the panel master branch and bokeh 2.3 (?) |
@philippjfr Is there something I should be doing to fix this PR? I'm also trying to set up a development version of bokeh and panel side-by-side (using |
Hmm, that sounds like problem with bokeh 2.3.0dev1 rather than anything in Panel. |
@philippjfr Thanks, indeed this was an issue in my development setup. The following example seems to work fine import panel as pn
import bokeh.models.widgets as bw
import panel.widgets as pw
from bokeh.models.widgets import PreText
from bokeh.layouts import column
from bokeh.plotting import curdoc
pn.extension()
txt = bw.PreText(text="")
input_box = pw.AutocompleteInput(restrict=False)
input_box.title = "Foo Bar"
input_box.value = "400"
input_box.completions = ["100001", "12344556", "3194567289", "209374209374"]
def update():
txt.text = f"Autocomplete value is {input_box.value}"
input_box.param.watch(lambda new_val: update(), 'value')
col = pn.Column()
col.extend([input_box, txt])
col.servable() It's still not clear to me why the CI on this PR failed and whether I need to make any modifications. |
That's not caused by you, I'll have to adjust the CI setup. |
Thanks again for this. I don't want to require bokeh 2.3 yet. So two favors, please add a version check which defines an entry in the |
Done! Here just a check that the version selector does what it is supposed to do: >>> from distutils.version import LooseVersion
>>> LooseVersion('2.3.0') < '2.3.0'
False
>>> LooseVersion('2.3.0dev1') < '2.3.0'
False
>>> LooseVersion('2.2.0') < '2.3.0'
True |
Thanks! |
fixes #685
bokeh 2.3.0 introduces a new
restrict
keyword (default: True).Setting it to False allows users to enter values that are not present in
the list of completions.